export const statusOptions = [
  { value: 'PENDING_PAYMENT', text: '待付款' },
  { value: 'PENDING_DELIVERY', text: '待发货' },
  { value: 'PENDING_RECEIVING', text: '待收货' },
  { value: 'PENDING_RETURNED', text: '待归还' },
  { value: 'CLOSED', text: '已完成' }
]

export const statusKeyValue = statusOptions.reduce((acc, cur) => {
  acc[cur.value] = cur.text
  return acc
}, {})

export const afterStatusOptions = [
  { key: 'NOPE', display_name: '无售后' },
  { key: 'APPLY', display_name: '申请售后' },
  { key: 'PROCESSING', display_name: '处理中' },
  { key: 'CANCELED', display_name: '取消售后' },
  { key: 'CLOSED', display_name: '处理完毕' }
]

export const afterStatusKeyValue = afterStatusOptions.reduce((acc, cur) => {
  acc[cur.key] = cur.display_name
  return acc
}, {})

export const rentTypeOptions = [
  { key: 'CREDIT', display_name: '信用免押' },
  { key: 'DEPOSIT', display_name: '保证金' }
]

export const rentTypeFilterOptions = [
  { value: 'CREDIT', text: '信用免押' },
  { value: 'DEPOSIT', text: '保证金' }
]

export const rentTypeKeyValue = rentTypeOptions.reduce((acc, cur) => {
  acc[cur.key] = cur.display_name
  return acc
}, {})
